//
//  FoodBaseInfoTabViewCell.m
//  ShiWuPai
//
//  Created by app on 16/11/30.
//  Copyright © 2016年 QQ:244987427. All rights reserved.
//

#import "FoodBaseInfoTabViewCell.h"
#import <UIKit+AFNetworking.h>
@interface FoodBaseInfoTabViewCell ()

@end
@implementation FoodBaseInfoTabViewCell

-(void)awakeFromNib{
   
}

-(void)setFood:(WHFood *)food{
    [self.foodImageView setImageWithURL:[NSURL URLWithString:food.thumbImageUrl] placeholderImage:nil];
    self.nameLable.text=food.name;
    self.caloryLable.text=food.calory;
    switch (food.healthLight) {
        case 1:{
            self.markDotView.backgroundColor=[UIColor greenColor];
        }
            break;
            
        case 2:{
            self.markDotView.backgroundColor=[UIColor orangeColor];
        }
            break;
            
        case 3:{
            self.markDotView.backgroundColor=[UIColor redColor];
        }
            break;


        default:
            break;
    }
}
@end
